package cn.tedu.test.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@ComponentScan("cn.tedu.test")
// @PropertySource("classpath:jdbc.properties")
@EnableTransactionManagement
public class Config {

    //@Bean
//    public DataSource dataSource(@Value("${db.url}")String url,
//                                 @Value("${db.username}")String userName,
//                                 @Value("${db.password}")String pwd){
//        DruidDataSource dataSource = new DruidDataSource();
//        dataSource.setUrl(url);
//        dataSource.setUsername(userName);
//        dataSource.setPassword(pwd);
//        return dataSource;
//    }

//    @Bean
//    public PasswordEncoder passwordEncoder(){
//        return PasswordEncoderFactories.createDelegatingPasswordEncoder();
//    }

}
